package com.example.demo.proxy;
import java.lang.reflect.Proxy;

public class DynamicProxy {

	@SuppressWarnings("unchecked")
	public static <T> T getProxy(Object target,Class<T> clazz) {
		return (T) Proxy.newProxyInstance(
				clazz.getClassLoader(), 
				target.getClass().getInterfaces(), 
				new TimeCSInvocationHandler(target));
	}
}
